package com.example.patentback.controller;

import com.example.patentback.entity.Helper;
import com.example.patentback.service.HelperService;
import com.example.patentback.util.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/helper")
public class HelperController {

    @Autowired
    HelperService helperService;

    @GetMapping("/select/{start}")
    public Result selectHelpers(@PathVariable(name = "start") int start){
        List<Helper> helpers = helperService.selectHelpers(start);
        return Result.success(helpers);
    }
}
